<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php"); //
	include("function/function.php");
	include("_include.user.judge.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心</title>
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/sq.css"/>
<script type="text/javascript" src="js/baidutongji.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>
</head>
<body>
    <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
    <!--top-bar end-->
    <!--banner begin-->
    <? include("_include.user.topbar.php")?>
    <!--banner end-->
    <!--member center-->
    <div class="member-box">
        <div class="content">
			<? include("_include.user.leftnav.php") ?>
            <div class="member-box-r">
                <div class="member-item1">
                    <div class="m-title">密码修改</div>
                    <?php include_once('_include.user.ordersearch.php');?>
                </div>
                <div class="member-basic">
                  <form id="pwdform" name="pwdform" method="post" action="user_editpwdaddsave.php?action=edit">
                    <table class="mbasic-table">
                      <tbody>
                        <tr>
                          <td class="left"><label>原密码 :</label></td>
                          <td class="right"><input name="user_ypassword" type="password" class="basic-input" id="user_ypassword" value="" />
                          	(默认密码为手机号)
                          </td>
                        </tr>
                        <tr>
                          <td class="left">新密码:</td>
                          <td class="right"><input name="user_password" type="password" class="basic-input" id="user_password" value="" /></td>
                        </tr>
                        <tr>
                          <td class="left"><label>重复密码:</label></td>
                          <td class="right"><input name="user_repassword" type="password" class="basic-input" id="user_repassword" value="" /></td>
                        </tr>
                        <tr>
                          <td class="left"></td>
                          <td class="right"><input type="submit" class="reset-btn" value="修改密码" /></td>
                        </tr>
                      </tbody>
                    </table>
                  </form>
				</div>
            </div>
        </div>
    </div>
    <!--member center-->
    <!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
    <!--foot begin-->
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="js/sq.js"></script>
    <script type="text/javascript" src="js/jquery.cityselect.js"></script>
    <script type="text/javascript">
        $(function(){
			// 表单提交
			$("#pwdform").submit(function(){
				var user_ypassword = $("#user_ypassword").val();
				var user_password = $("#user_password").val();
				var user_repassword = $("#user_repassword").val();

				// 密码验证
				if(user_ypassword.replace(/\ /g,"").length<1){
					alert("原密码不能为空！");
					$("#user_ypassword").focus();
					return false;
				}
				if(user_password.replace(/\ /g,"").length<5){
					alert("密码不能少于5位字符！");
					$("#user_password").focus();
					return false;
				}
				if(user_repassword.replace(/\ /g,"").length<5){
					alert("两次密码输入不一致！");
					$("#user_repassword").focus();
					return false;
				}
				if(user_password != user_repassword){
					alert("两次密码输入不一致！");
					$("#user_password").focus();
					return false;
				}
			});
        });
    </script>
</body>
</html>

